-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
01 - Add a header image to the homepage #6
Open
luca-rath
wants to merge
1
commit into
master
Choose a base branch
from
assignment/01
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
niklasnatter
force-pushed
the
assignment/01
branch
from
July 9, 2020 08:40
c8d2b1b
to
54dc2eb
Compare
niklasnatter
force-pushed
the
assignment/01
branch
2 times, most recently
from
September 23, 2020 10:47
27ab3c6
to
b0a9741
Compare
niklasnatter
force-pushed
the
assignment/01
branch
6 times, most recently
from
October 23, 2020 15:14
5b17716
to
3a7ed77
Compare
luca-rath
force-pushed
the
assignment/01
branch
from
November 6, 2020 13:12
3a7ed77
to
a48c3cd
Compare
niklasnatter
force-pushed
the
assignment/01
branch
2 times, most recently
from
February 16, 2021 14:23
a07c1b8
to
2f93f7f
Compare
niklasnatter
force-pushed
the
assignment/01
branch
2 times, most recently
from
March 31, 2021 10:51
4db185c
to
b5bf216
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
May 27, 2021 12:47
b5bf216
to
34b1d1b
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
June 22, 2021 08:46
34b1d1b
to
a7cf2ce
Compare
Note: I think the docs in this description have moved.
|
niklasnatter
force-pushed
the
assignment/01
branch
from
June 20, 2022 19:46
a7cf2ce
to
4fcfa45
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
June 20, 2022 20:06
4fcfa45
to
74ec36a
Compare
niklasnatter
force-pushed
the
master
branch
2 times, most recently
from
June 20, 2022 21:08
7a92790
to
607f272
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
June 20, 2022 21:10
74ec36a
to
a2908ef
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
June 20, 2022 21:19
a2908ef
to
8c9c7ec
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
October 17, 2022 13:31
8c9c7ec
to
0de9bf1
Compare
niklasnatter
force-pushed
the
assignment/01
branch
from
October 17, 2022 14:52
0de9bf1
to
97dd61d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a header image to the homepage
Goal
Our homepage looks quite naked right now. To stir our users emotions, we would like to add a nice header image on
the homepage.
Steps
headerImage
with the typesingle_media_selection
to theconfig/templates/pages/homepage.xml
filex400
to theconfig/image-formats.xml
filetemplates/pages/homepage.html.twig
in the right dimensionHints
{{ dump(content) }}
in the Twig template to find out how to output the header image URL.More Information
To solve this assignment we need to understand a few different concepts in Sulu:
Each page in Sulu has a template. The template consists of two parts:
A template is made up of properties. Each property has a name (for example "title") and a (content) type (for
example
text_line
). The supported content types can be found in the documentation:http://docs.sulu.io/en/latest/reference/content-types/index.html
Furthermore, Sulu uses image formats to transparently create thumbnails in the respective sizes for uploaded images.
A thumbnail is generated when it is accessed for the first time. That means that only thumbnails that are really used
are stored on your disk.
When defining image formats, you can apply different actions to your source images. The most used action is scale,
which resizes an image into the desired dimensions while keeping its original aspect ratio
(http://docs.sulu.io/en/latest/book/image-formats.html).
Links